﻿<Window x:Class="ImHere.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="I'm Here" 
        Height="800"  Width="1200" 
        Loaded="WindowLoaded"
        Closing="MainWindow_Closing">
    <Window.Resources>
        <SolidColorBrush x:Key="MediumGreyBrush" Color="#ff6e6e6e" />
        <SolidColorBrush x:Key="KinectPurpleBrush" Color="#ff52318f" />
        <SolidColorBrush x:Key="KinectBlueBrush" Color="#ff00BCF2" />
        <Style TargetType="{x:Type Image}">
            <Setter Property="SnapsToDevicePixels" Value="True" />
        </Style>
        <Style TargetType="{x:Type Button}" x:Key="ScreenshotButton" >
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Grid>
                            <StackPanel Orientation="Horizontal" Background="Transparent">
                                <TextBlock x:Name="ScreenshotText" Text="{TemplateBinding Content}" TextAlignment="Left"  VerticalAlignment="Center" Foreground="{StaticResource KinectPurpleBrush}" FontSize="15" />
                                <Grid Margin="9,0,0,0">
                                    <Image x:Name="ScreenshotNormal" Source="Images\ScreenshotNormal.png" Stretch="None" HorizontalAlignment="Center" />
                                    <Image x:Name="ScreenshotHover" Source="Images\ScreenshotHover.png" Stretch="None" HorizontalAlignment="Center" Visibility="Collapsed" />
                                </Grid>
                            </StackPanel>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Visibility" Value="Collapsed" TargetName="ScreenshotNormal" />
                                <Setter Property="Visibility" Value="Visible" TargetName="ScreenshotHover" />
                                <Setter Property="Foreground" Value="{StaticResource KinectBlueBrush}" TargetName="ScreenshotText" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid Margin="10 0 10 0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Border Grid.Row="0">
            <Border.Background>
                Snow
            </Border.Background>
        </Border>
        <Image Grid.Row="0" HorizontalAlignment="Left" Source="Images\logo.png" Stretch="Fill" Height="80" Width="80" Margin="0 10 0 5" />
        <TextBlock Grid.Row="0" HorizontalAlignment="Right" Margin="0 0 -1 0" VerticalAlignment="Center" Foreground="Red" FontFamily="Segoe UI" FontSize="18" >Coder Camps</TextBlock>
        <TextBlock Grid.Row="0" HorizontalAlignment="Center" Margin="0 0 -1 0" VerticalAlignment="Center" Foreground="Orange" FontFamily="Arial Black" FontSize="24">I'm Here!</TextBlock>

        <Border Grid.Row="1">
            <Border.Background>
                <ImageBrush ImageSource="{Binding ImgSource}" />
            </Border.Background>
            <Image Name="camera" Margin="0" Stretch="UniformToFill"/>
        </Border>
        <StatusBar Grid.Row="1" HorizontalAlignment="Stretch" Name="statusBar" VerticalAlignment="Bottom" Background="White" Foreground="{StaticResource MediumGreyBrush}">
            <StatusBarItem Content="{Binding StatusText}" FontSize="24" FontFamily="Comic Sans MS" Foreground="DarkBlue" HorizontalAlignment="Center" VerticalAlignment="Bottom"/>
        </StatusBar>
        <Viewbox Grid.Row="1" HorizontalAlignment="Center" Margin="261,60,252,54" Width="800">
            <Image Source="{Binding PicSource}" HorizontalAlignment="Stretch" Margin="50,20,0,50" Stretch="UniformToFill" />
        </Viewbox>

        <Border Grid.Row="2">
            <Border.Background>
                Snow
            </Border.Background>
        </Border>
        <TextBox Name="azuser" Grid.Row="2" HorizontalAlignment="Center" Background="FloralWhite" VerticalAlignment="Center" Margin="160,0,160,0" Width="852" Height="52" FontSize="24" TextAlignment="Center" Visibility="Hidden" Text="{Binding AzUser, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox Name="azpass" Grid.Row="2" HorizontalAlignment="Center" Background="FloralWhite" VerticalAlignment="Center" Margin="160,0,160,0" Width="852" Height="52" FontSize="24" TextAlignment="Center" Visibility="Hidden" Text="{Binding AzPass, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox Name="namespot" Grid.Row="2" HorizontalAlignment="Center" Background="FloralWhite" VerticalAlignment="Center" Margin="160,0,160,0" Width="852" Height="52" FontSize="24" TextAlignment="Center" Visibility="Hidden" Text="{Binding MyName, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox Name="emailspace" Grid.Row="2" HorizontalAlignment="Center" Background="FloralWhite" VerticalAlignment="Center" Margin="160,0,160,0" Width="852" Height="52" FontSize="24" TextAlignment="Center" Visibility="Hidden" Text="{Binding Email, UpdateSourceTrigger=PropertyChanged}"/>
        <Button Grid.Row="2" Name="SnapShot"  Style="{StaticResource ScreenshotButton}" Visibility="Hidden" Content="Snap a photo!" Height="Auto" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="10 10 0 10" Click="Screenshot_click" />
    </Grid>
</Window>
